export interface PermissionItem {
  id: string;
  // gmtCreate: string;
  // gmtModified: string;
  // deleted: false;
  pid: string; // 父级菜单id
  name: string;
  code: string; // 权限值
  toCode: string; // 跳转权限值
  // status: null;
  type: number; // 1 路由菜单 2 按钮菜单
  level: number; // 菜单等级
  children: PermissionList;
  select: boolean; // 是否选中，是否拥有这个权限
}

export type SavePermissionParams = Omit<
  PermissionItem,
  "id" | "children" | "select" | "toCode"
>;

export type PermissionList = PermissionItem[];

export interface GetRolePermissionListResponse {
  children: PermissionList;
}
